package com.association.logging.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
@TableName("log")
@Data
public class Log {
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField("create_time")
    private Date createTime;
    @TableField("description")
    private String description;
    @TableField("exception_detail")
    private String exceptionDetail;
    @TableField("log_type")
    private String logType;
    @TableField("method")
    private String method;
    @TableField("params")
    private String params;
    @TableField("request_ip")
    private String requestIp;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(name = "time" )
    private Long time;
    @TableField("username")
    private String userName;
    @TableField("address")
    private String address;
    @TableField("browser")
    private String browser;
    @TableField("type")
    private int type;
    @TableField("uid")
    private Long uid;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField("update_time")
    private Date updateTime;
    @TableField("is_del")
    private int isDel;
}
